home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / Tool Chest / Development Platforms / MPW Related / MPW Interfaces / PInterfaces / ToolUtils.p < prev    next >
Encoding:
Text File  |  1993-09-17  |  2.7 KB  |  107 lines  |  [TEXT/MPS ]

  1. {
  2.     File:        ToolUtils.p
  3.  
  4.     Copyright:    © 1983-1993 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Version:    System 7.1 for ETO #11
  8.     Created:    Tuesday, March 30, 1993 18:00
  9.  
  10. }
  11.  
  12. {$IFC UNDEFINED UsingIncludes}
  13. {$SETC UsingIncludes := 0}
  14. {$ENDC}
  15.  
  16. {$IFC NOT UsingIncludes}
  17.     UNIT ToolUtils;
  18.     INTERFACE
  19. {$ENDC}
  20.  
  21. {$IFC UNDEFINED UsingToolUtils}
  22. {$SETC UsingToolUtils := 1}
  23.  
  24. {$I+}
  25. {$SETC ToolUtilsIncludes := UsingIncludes}
  26. {$SETC UsingIncludes := 1}
  27. {$IFC UNDEFINED UsingQuickdraw}
  28. {$I $$Shell(PInterfaces)Quickdraw.p}
  29. {$ENDC}
  30. {$SETC UsingIncludes := ToolUtilsIncludes}
  31.  
  32. CONST
  33. sysPatListID = 0;
  34. iBeamCursor = 1;
  35. crossCursor = 2;
  36. plusCursor = 3;
  37. watchCursor = 4;
  38.  
  39. TYPE
  40. Int64Bit = RECORD
  41.     hiLong: LONGINT;
  42.     loLong: LONGINT;
  43.     END;
  44.  
  45.  
  46. FUNCTION FixRatio(numer: INTEGER;denom: INTEGER): Fixed;
  47.     INLINE $A869;
  48. FUNCTION FixMul(a: Fixed;b: Fixed): Fixed;
  49.     INLINE $A868;
  50. FUNCTION FixRound(x: Fixed): INTEGER;
  51.     INLINE $A86C;
  52. PROCEDURE PackBits(VAR srcPtr: Ptr;VAR dstPtr: Ptr;srcBytes: INTEGER);
  53.     INLINE $A8CF;
  54. PROCEDURE UnpackBits(VAR srcPtr: Ptr;VAR dstPtr: Ptr;dstBytes: INTEGER);
  55.     INLINE $A8D0;
  56. FUNCTION BitTst(bytePtr: Ptr;bitNum: LONGINT): BOOLEAN;
  57.     INLINE $A85D;
  58. PROCEDURE BitSet(bytePtr: Ptr;bitNum: LONGINT);
  59.     INLINE $A85E;
  60. PROCEDURE BitClr(bytePtr: Ptr;bitNum: LONGINT);
  61.     INLINE $A85F;
  62. FUNCTION BitAnd(value1: LONGINT;value2: LONGINT): LONGINT;
  63.     INLINE $A858;
  64. FUNCTION BitOr(value1: LONGINT;value2: LONGINT): LONGINT;
  65.     INLINE $A85B;
  66. FUNCTION BitXor(value1: LONGINT;value2: LONGINT): LONGINT;
  67.     INLINE $A859;
  68. FUNCTION BitNot(value: LONGINT): LONGINT;
  69.     INLINE $A85A;
  70. FUNCTION BitShift(value: LONGINT;count: INTEGER): LONGINT;
  71.     INLINE $A85C;
  72. FUNCTION HiWord(x: LONGINT): INTEGER;
  73.     INLINE $A86A;
  74. FUNCTION LoWord(x: LONGINT): INTEGER;
  75.     INLINE $A86B;
  76. PROCEDURE LongMul(a: LONGINT;b: LONGINT;VAR result: Int64Bit);
  77.     INLINE $A867;
  78. FUNCTION GetIcon(iconID: INTEGER): Handle;
  79.     INLINE $A9BB;
  80. PROCEDURE PlotIcon(theRect: Rect;theIcon: Handle);
  81.     INLINE $A94B;
  82. FUNCTION GetPattern(patternID: INTEGER): PatHandle;
  83.     INLINE $A9B8;
  84. FUNCTION GetCursor(cursorID: INTEGER): CursHandle;
  85.     INLINE $A9B9;
  86. FUNCTION GetPicture(pictureID: INTEGER): PicHandle;
  87.     INLINE $A9BC;
  88. FUNCTION SlopeFromAngle(angle: INTEGER): Fixed;
  89.     INLINE $A8BC;
  90. FUNCTION AngleFromSlope(slope: Fixed): INTEGER;
  91.     INLINE $A8C4;
  92. FUNCTION DeltaPoint(ptA: Point;ptB: Point): LONGINT;
  93.     INLINE $A94F;
  94. PROCEDURE ShieldCursor(shieldRect: Rect;offsetPt: Point);
  95.     INLINE $A855;
  96. PROCEDURE ScreenRes(VAR scrnHRes: INTEGER;VAR scrnVRes: INTEGER);
  97.     INLINE $225F,$32B8,$0102,$225F,$32B8,$0104;
  98. PROCEDURE GetIndPattern(VAR thePat: Pattern;patternListID: INTEGER;index: INTEGER);
  99.  
  100.  
  101. {$ENDC}    { UsingToolUtils }
  102.  
  103. {$IFC NOT UsingIncludes}
  104.     END.
  105. {$ENDC}
  106.  
  107.